# Contributor: Lee Hinman <hinman@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=mg
pkgver=20220614
pkgrel=0
pkgdesc="microscopic EMACS style editor"
url="https://github.com/hboetes/mg"
arch="all"
license="Public-Domain"
makedepends="ncurses-dev libbsd-dev bsd-compat-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hboetes/mg/archive/$pkgver.tar.gz"
options="!check"

build() {
	make prefix=/usr mandir=/usr/share/man
}

package() {
	make INSTALL=install DESTDIR="$pkgdir" prefix=/usr \
		mandir=/usr/share/man install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 README README.md tutorial \
		"$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
bed455cda856e54fae28592ac0a520841d5d542880a7405dadf702d7407ac33ae7fb7b63880805a7e166e0e0a87c76b9fca1700c444f1b999a5af66732c69b65  mg-20220614.tar.gz
"
